/**
 * Created by XHL on 2022-07-26.
 */

#ifndef MOVE_TEST_THE_MAP_H
#define MOVE_TEST_THE_MAP_H
#pragma once

#include <Environment.h>
#include <Tank.h>

namespace entity {

	class TheMap : public Environment {
	public:
		TheMap(const int &time_, const int &size);

		void response() override;

		void draw() const;

		[[nodiscard]] const Tank *getTankA() const;

		[[nodiscard]] const Tank *getTankB() const;

		[[nodiscard]] int get_size() const;

		void set_size(int size);

	private:

		static void draw_horizontal(const meta::Location &pos, const int &length);

		static void draw_vertical(meta::Location pos, const int &length);

		void modify_hp();

	private:
		int m_size;
		int m_time;
		bool m_shrunk;
		Tank *m_tankA;
	public:
		void set_player_A(Tank *mTankA);

		void set_player_B(Tank *mTankB);

	private:
		Tank *m_tankB;
	};

} // entity

#endif //MOVE_TEST_THE_MAP_H
